package cn.clazz.interfaced

/**
  * Created by lzd on 2018/9/5.
  */
trait Person2 {
  val eyeNum:Int=2
  val msg:String
}
class Student2(val name:String) extends Person2{
  override val msg: String = "66"
  def sayHello()=println("Hi,I'm "+name +"I have "+eyeNum+" eyes ! " +msg)

}
object Test2{
  def main(args: Array[String]) {
    val s=new Student2("zhangsanfeng")
    s.sayHello();
  }
}
